/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package handler;

import model.Robot;

/**
 *
 * @author minhtue001
 */
public class RotateHandler implements Handler {
    public static int LEFT = 0;
    public static int RIGHT = 1;
    
    public void onRotateLeft() {
        Robot.getInstance().rotateLeft();
    }
    
    public void onRotateRight() {
        Robot.getInstance().rotateRight();
    }

    @Override
    public void handle(String command) {
        if (command.charAt(0) == 'L')
            onRotateLeft();
        else 
            if(command.charAt(0) == 'R')
                onRotateRight();
    }
    
}
